/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package my12306.bean;

/**
 *
 * @author Jack
 */
public class Tokens {

    private String token;
    private String ticket;
    private String bedlevel;

    public Tokens() {
    }

    /**
     * @return the token
     */
    public String getToken() {
        return token;
    }

    public boolean isEmpty() {
        return (token == null || token.isEmpty())
                || (ticket == null || ticket.isEmpty())
                || (bedlevel == null || bedlevel.isEmpty());
    }

    /**
     * @param token the token to set
     */
    public void setToken(String token) {
        this.token = token;
    }

    /**
     * @return the ticket
     */
    public String getTicket() {
        return ticket;
    }

    /**
     * @param ticket the ticket to set
     */
    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    /**
     * @return the bedlevel
     */
    public String getBedlevel() {
        return bedlevel;
    }

    /**
     * @param bedlevel the bedlevel to set
     */
    public void setBedlevel(String bedlevel) {
        this.bedlevel = bedlevel;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("token: [").append(token).append("]\n");
        sb.append("ticket: [").append(ticket).append("]\n");
        sb.append("bedlevel: [").append(bedlevel).append("]\n");
        return sb.toString();
    }
}
